home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / t3_1 / doc.lha / documentation / manual / tman.lib < prev    next >
Text File  |  1987-06-30  |  9KB  |  299 lines

  1. @marker[LIBRARY, tman]        @Comment{-*-System:TMAN-*-}
  2.  
  3. @comment{
  4.  
  5.             T Manual Conventions
  6.  
  7.   - Always refer to the language as @tau[] and the implementations
  8.     as @timp[]
  9.   - Use square brackets for as many delimiters as possible particularly in
  10.     running text.  Exceptions:
  11.       - Use double quotes for the @qu
  12.       - Use curly braces for comments
  13.   - To put something in the code font, use the @tc[...] form
  14.   - Put all scribe commands in lower case unless mixed case is needed 
  15.     to separate component words 
  16.   - Two spaces after periods (Scribe needs this to see a sentence break)
  17.   - Section titles should be capitalized as if they were sentences
  18.   - Leave a blank line before the @begin and after the @end when possible,
  19.     and generally try to make the manual sources readable
  20.  
  21. }
  22.  
  23. @style[spacing .9]
  24. @modify[itemize, spacing .9]
  25. @modify[description, spacing .9]
  26. @modify[enumerate, spacing .9]
  27.  
  28. @style[indent 0]
  29. @style[bibselect cited]
  30. @style[references = STDalphabetic]
  31. @style[time = "4:30 PM"]
  32.  
  33. @modify[HD1, below 1.2, PageBreak before]
  34. @modify[HD1A, below 1.2, PageBreak before]
  35. @define[HD1B=HD1A, PageBreak UntilOdd]
  36. @modify[HD2, below .8, need 4]
  37. @modify[HD3, below .8]
  38.  
  39. @Counter[XPrefaceSection,TitleEnv HD1A,Alias Chapter]
  40. @Modify[PrefaceSection, TitleEnv HD1B]    @Comment{for Table of Contents}
  41.  
  42. @define[ChpEnv=HD1, spacing 0.3]
  43. @define[AppEnv=HD1A, spacing 1]
  44.  
  45. @define[smaller, size -1]
  46. @define[small, size 8]
  47.  
  48. @define[stc=tc, size -1]
  49.  
  50. @modify[MajorPart, numbered [@I:], referenced [@I],
  51.  ContentsForm "@TC0[@parm[referenced] @parm[title]@].  @\@rfstr[@parm[page]]]",
  52.  TitleForm    "@HD1A[Part @parm[numbered] @parm[title]]" ]
  53.  
  54. @modify[chapter, numbered [@1],
  55.  TitleForm "@ChpEnv[Chapter @parm[referenced]@>@parm[title]@*@&_@hsp[-10pt]]"
  56.  ]
  57.  
  58. @modify[appendix, numbered [@A.], referenced [@A],
  59.  ContentsForm 
  60.    "@tc1[Appendix @parm(referenced): @parm(title)@).  @\@rfstr(@parm(page))]",
  61.  TitleForm
  62.    "@ChpEnv[Appendix @parm[referenced]@>@parm[title]@*@&_@hsp[-10pt]]"
  63.  ]
  64.  
  65. @modify[UnNumbered,
  66.  TitleForm "@ChpEnv[@>@parm[title]@*@&_@hsp[-10pt]]"
  67.  ]
  68.  
  69. @define[TEG=ProgramExample]
  70. @define[SmallTEG=ProgramExample, size -1]
  71.  
  72. @comment { Macros --
  73.  @wt[CODE]    - for a small piece of CODE that can't be broken across a line
  74.  @termi[TERM] - index TERM; put it in the text in bold italics
  75.  @ix[TERM]    - index TERM; put it in the text as is
  76.  @iix[TERM]   - index TERM; put it in the text in italics
  77.  @iixs[TERM]  - index TERMs; put TERM in the text in italics
  78.  @tindex[TERM]- index TERM in the code font
  79.  @tix[TERM]   - index TERM in code font; put it in the text in code font
  80.  
  81.  @SmCaps[TEXT]   - put TEXT in Small Caps, uncapitalized, in SIZE -1
  82.  
  83.  @LightBar[]     - draw a line across the current environment, maybe
  84.            not as dark as @crossbar (device dependent)
  85.  
  86.  @CrossBar[]     - draw a line across the current environment
  87.  
  88.  @PHeading[FOO]  - sets the new page heading, puts FOO in the chapter position
  89.  @PFooting[]     - sets the page footing
  90.  
  91.  @chap[CHAPTERNAME] - start a new chapter, frobs heads
  92.  
  93.  @XMajorPart[]   - start a major part, frobs heads
  94.  
  95.  @dc[COMMENT]    - COMMENT will appear in the text if DRAFT = 1
  96.  
  97.  -- See TMAC.LIB for device dependent macros --
  98.  
  99.  -- Should the @wt command do a "spaces kept"?  It did before, but then
  100.     it was losing.
  101.  }
  102.  
  103. @textform (
  104.   wt    = "@begin[w]@tc[@parm[text]]@end[w]",
  105.   termi = "@i@parmquote[text]@index@parmquote[text]",
  106.   ix    = "@parm[text]@index@parmquote[text]",
  107.   iix   = "@i@parmquote[text]@index@parmquote[text]",
  108.   iixs  = "@i@parmquote[text]@index[@parm[text]s]",
  109.   tix   = "@tc@parmquote[text]@tindex@parmquote[text]",
  110.   tindex= "@IndexEntry{key=@parmquote[text],text=[@TC@parmquote[text]],number}",
  111.   tindexhack = "@IndexEntry{key='@parm[text]$',text=[@TC'@parm[text]'],number}",
  112.  
  113.   SmCaps = "@begin[C, size -1]@parm[text]@end[C]",
  114.  
  115.   crossbar = "@begin[format, above 0, below 0]@&_@hsp[-10pt]@end[format]",
  116.   )
  117.  
  118. @comment{ device dependent macros are in tmac.lib }
  119.  
  120. @define [IndexEnv, Break, CRBreak, Fill, BlankLines Kept,
  121.   Font BodyFont, Facecode R, Spread 0, Spacing 1,  Size 10,
  122.   Spaces Kept, LeftMargin 8,  Indent -8,
  123.   Columns 2, ColumnMargin 0.5inch,
  124.   Linewidth 3inches, Boxed]
  125.  
  126. @LibraryFile[IndexHeadings]
  127. @modify[IndexHeading, referenced "@@b[@@ @@ @@dash[] @A @@dash[]]" ]
  128. @GenerateIndexHeadings[]
  129.  
  130.  
  131. @style(DoubleSided)
  132.  
  133. @textform (PHeading = <
  134.     @PageHeading(even, left   "@value(page)@hsp(1em)@ @value(SectionTitle)",
  135.                right  "@SmCaps(The @TAU() Manual)")
  136.  
  137.     @PageHeading(odd,  left  "@SmCaps(The @TAU() Manual)",
  138.                right "@parm[text]@hsp(1em)@ @ @value(page)")
  139.     >)
  140.  
  141. @textform (PFootingDraft = <
  142.     @PageFooting(even, left "@small[DRAFT]",
  143.                right "@small[@Value(SourceFile)]")
  144.     @PageFooting(odd, right "@small[DRAFT]",
  145.               left "@small[@Value(SourceFile)]")
  146.     >)
  147.  
  148. @textform (PFootingNoDraft = <
  149.     @PageFooting(even, left "", right "")
  150.     @PageFooting(odd, right "", left "")
  151.     >)
  152.  
  153. @case(draft, 1   = ' @textform(PFooting = "@PFootingDraft[]") ', 
  154.          else= ' @textform(PFooting = "@PFootingNoDraft[]") '
  155.      )
  156.  
  157. @Comment{ @chap(foo) turns off running head of the current page, and sets
  158.           the heading to the new chapter name }
  159. @textform (chap = <
  160.     @chapter@parmquote[text]
  161.     @PageHeading[immediate, left "", center "", right ""]
  162.     @PageFooting[immediate, left "", center "@value(page)", right ""]
  163.     @PHeading@parmquote[text]
  164.     @PFooting[]
  165.     >)
  166.  
  167. @textform (XMajorPart = <
  168.     @PHeading@parmquote[text]
  169.     @MajorPart@parmquote[text]
  170.     >)
  171.  
  172. @case(draft, 1   = ' @textform(dc = "[@DraftCommentMarker[]@parm[text]]") ', 
  173.          else= ' @textform ( dc = "@comment[]" ) '
  174.      )
  175.  
  176.  
  177. @Comment{** Add a Reference Card Entry Macros **}
  178. @Form(ABriefE={})
  179. @Form(ABriefC={})
  180. @TextForm(AnEquivE="")
  181.  
  182.  
  183. @Comment{** The INSET Command Definitions **}
  184.  
  185. @Define(InsetEnv=Quotation, LeftMargin +5, RightMargin +0,
  186.         Above 0, Below 1, Size -2, Spread .5, spacing .9)
  187.  
  188. @TextForm( BeginInset = {
  189. @Begin(InsetEnv)
  190. @Begin(Multiple, Break After)
  191. @\@Imbed(Text, def "@b(@Parm(text)) ", undef "@b(Note:) ")@~
  192. })
  193.  
  194. @TextForm ( EndInset = "@End(Multiple) @End(InsetEnv)" )
  195.  
  196.  
  197. @Comment{ Scribe questions: How to you get multiple indices?
  198.                 How do you get numbers in the index to
  199.                  be different fonts?
  200.                 Why hasn't somebody organized all this
  201.                  stuff for me already?
  202.  
  203.  Get Steele's stuff for the Common Lisp manual
  204. }
  205.  
  206. @Comment{** The DESC Command Definitions **
  207.   The INFO takes an optional keyworded argument, and an optional keyword:
  208.   NOTES="string" -- STRING will be flushed right in the function header line
  209.   NL             -- if present, the function described will not be labelled
  210.   IndexHack      -- if present the described item will be indexed as if it
  211.             had a $ appended to it.
  212. }
  213.  
  214. @Define(DescriptionEnv=Text, LeftMargin +5, RightMargin +0, Above .5, Below 1.5,
  215.         Indent 0)
  216.  
  217. @form(info = {
  218. @string(TmpNote='@parm(NOTES, default=())')
  219. @string(TmpLabelP='@imbed(NL, def "false", undef "true")')
  220. @string(TmpIndexHack='@imbed(IndexHack, def "true", undef "false")')
  221. } )
  222.  
  223. @Info() @Comment{intialize string values}
  224.  
  225. @comment{
  226.  
  227.    @desc[(LIST . @i[objects])  @yl[]  @i[list]]
  228.    <description>
  229.    @EndDesc[LIST]
  230.  
  231.    @descN[F1="(ADD ...)  @yl  ...", FN1="ADD",
  232.           F2="(+ ...)            ", FN2="+",  NL2,
  233.           ...]
  234.    <description>
  235.    @EndDescN[]
  236.  
  237. Fn - the function header line
  238. FNn - the name to index and label
  239. NLn - if present, FNn will not be labelled
  240. current N can be at most 6
  241.  
  242. }
  243.  
  244. @TextForm( desc = {
  245. @begin[transparent, need 3]
  246. @begin[format, continue]
  247. @tc[@parm[text,default=[**manuscript-error**]]]@>@i[@Value[TmpNote]]
  248. @end[format]
  249. @begin[DescriptionEnv]
  250. })
  251.  
  252. @TextForm( EndDesc = {
  253. @case[TmpIndexHack, true  "@tindexhack@parmquote[text]",
  254.             false "@tindex@parmquote[text]"]@~
  255. @case[TmpLabelP, true "@label@ParmQuote[TEXT]", false ""]@~
  256. @string[TmpNote=""]
  257. @string[TmpLabelP="true"]
  258. @string[TmpIndexHack="false"]
  259. @end[DescriptionEnv]
  260. @end[transparent]
  261. })
  262.  
  263. @form( descN = {
  264. @begin[transparent, need 5]
  265. @begin[format, continue]
  266. @imbed[F1,  def "@tc[@parm[F1]]@>@i[@value[TmpNote]]", undef "@~"]
  267. @imbed[F2,  def "@tc[@parm[F2]]", undef "@~"]
  268. @imbed[F3,  def "@tc[@parm[F3]]", undef "@~"]
  269. @imbed[F4,  def "@tc[@parm[F4]]", undef "@~"]
  270. @imbed[F5,  def "@tc[@parm[F5]]", undef "@~"]
  271. @imbed[F6,  def "@tc[@parm[F6]]", undef "@~"]
  272. @imbed[FN1, def "@tindex[@parm[FN1]]@~
  273.                  @imbed[NL1, undef '@label@ParmQuote[FN1]', def '']", 
  274.             undef ""]@~
  275. @imbed[FN2, def "@tindex[@parm[FN2]]@~
  276.                  @imbed[NL2, undef '@label@ParmQuote[FN2]', def '']", 
  277.             undef ""]@~
  278. @imbed[FN3, def "@tindex[@parm[FN3]]@~
  279.                  @imbed[NL3, undef '@label@ParmQuote[FN3]', def '']", 
  280.             undef ""]@~
  281. @imbed[FN4, def "@tindex[@parm[FN4]]@~
  282.                  @imbed[NL4, undef '@label@ParmQuote[FN4]', def '']", 
  283.             undef ""]@~
  284. @imbed[FN5, def "@tindex[@parm[FN5]]@~
  285.                  @imbed[NL5, undef '@label@ParmQuote[FN5]', def '']", 
  286.             undef ""]@~
  287. @imbed[FN6, def "@tindex[@parm[FN6]]@~
  288.                  @imbed[NL6, undef '@label@ParmQuote[FN6]', def '']", 
  289.             undef ""]@~
  290. @end[format]
  291. @begin[DescriptionEnv]
  292. })
  293.  
  294. @form( EndDescN = {
  295. @string[TmpNote=""]
  296. @end[DescriptionEnv]
  297. @end[transparent]
  298. })
  299.